<template>
	<h2>首页统计参数设置</h2>
	<el-form-item :label="model[globalparam.assetStatisticsStatusRange.paramCode].paramName">
		<ex-check-box v-model="model[globalparam.assetStatisticsStatusRange.paramCode].paramValue" dict-code="ASSET_STATUS"></ex-check-box>
	</el-form-item>
	<el-form-item :label="model[globalparam.assetStatisticsRange.paramCode].paramName">
		<ex-radio-group v-model="model[globalparam.assetStatisticsRange.paramCode].paramValue" dict-code="DATA_STATISTICS_RANGE"></ex-radio-group>
	</el-form-item>
<!--	 首页资产分类统计的统计分类-->
	<el-form-item :label="model[globalparam.assetCategoryStatisticsType.paramCode].paramName">
		<ex-cascader v-model="model[globalparam.assetCategoryStatisticsType.paramCode].paramValue" dict-code="FamsAssetCategory" key-prop="id" multiple="true"></ex-cascader>
	</el-form-item>

</template>

<script>

import globalparam from "@/constant/model/globalparam";
import ExRadioGroup from "@/components/exRadioGroup/index.vue";
import ExCheckBox from "@/components/exCheckBox/index.vue";
import ExCascader from "@/components/exCascader/index.vue";

export default {
	name: 'indexSetting',
	computed: {
		globalparam() {
			return globalparam
		}
	},
	components: {ExCascader, ExCheckBox, ExRadioGroup},
	props: {
		model: {type: Object, default: {}}
	},
	data() {
		return {
			params: [
				globalparam.assetStatisticsStatusRange,
				globalparam.assetStatisticsRange,
				globalparam.assetCategoryStatisticsType,
			],
		}
	},
	created() {
		this.params.forEach(item => {
			if (!this.model[item.paramCode]) {
				this.model[item.paramCode] = item;
			}else{
				this.model[item.paramCode].paramName = item.paramName;
			}
		});
	},
	mounted() {
	},
	methods: {}
}
</script>
